/*
 * RSendAs_SMS.h
 *
 *  Created on: 2011-4-15
 *      Author: user
 */

#ifndef RSENDAS_SMS_H_
#define RSENDAS_SMS_H_

#include <e32base.h>
#include <F32FILE.H>
#include <BADESCA.H>

#include <rsendasmessage.h>
#include <rsendas.h>
#include <MTCLREG.H>

class MRSendSMSObserver
{
public:
    virtual void MessageSentL( TInt aError ) = 0;
};

class CRSendAsSender : public CActive, public MMsvSessionObserver
{
public:
    static CRSendAsSender* NewL( MRSendSMSObserver& aObserver, const TDesC& aMessage, const TDesC& aRecipients );
    ~CRSendAsSender( );
protected:
    void DoCancel( );
    void RunL( );
private:
    CRSendAsSender( MRSendSMSObserver& aObserver );
    void ConstructL( const TDesC& aMessage, const TDesC& aRecipients );
private:
    MRSendSMSObserver& iObserver;
    RSendAs iSendAs;
    RSendAsMessage iSendAsMessage;
private:
    CMsvSession* iSession;
public:
    virtual void HandleSessionEventL( TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3 );
};

#endif /* RSENDAS_SMS_H_ */
